From 3890bbbfc3d4713e05f8140d6af537f3fa9a7eca Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Wed, 24 Jun 2009 11:15:31 +0100 Subject: [PATCH] VT-d: don't disable VT-d engine in suspend for security purpose force_iommu option is used to force enabling and using IOMMU for security purpose. So when force_iommu is set, it shouldn't disable VT-d engines in suspend. Signed-off-by: Weidong Han --- xen/drivers/passthrough/vtd/iommu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index 25e5fa9c1a..e471e815ed 100644 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -1877,6 +1877,10 @@ void iommu_suspend(void) iommu_state[i][DMAR_FEUADDR_REG] = (u32) dmar_readl(iommu->reg, DMAR_FEUADDR_REG); + /* don't disable VT-d engine when force_iommu is set. */ + if ( force_iommu ) + continue; + iommu_disable_translation(iommu); if ( iommu_intremap ) -- 2.30.2